import { ContainerListVo } from './container';
import { ServerListVo } from './server';

/**
 * ApplicationListInfo
 * 项目管理的基本信息
 */
export interface ApplicationListInfo {
    cveNums: number;
    libNums: number;
    createDate: string;
    contenerList: Array<ContainerListVo>;
    serverList: Array<ServerListVo>;
    appId: string;                  // App的唯一标志 UUID
    language: string;               // App使用的编程语言
    showName: string;               // 展示的名称 默认就是应用名称，但用户可以更改
    path: string;                   // 应用的项目路径
}

/**
 * Application Basic Info
 * Description: App项目基本信息，常用于其他接口、类的子类
 */
export interface AppBasicInfo {
    appId: string;                  // App的唯一标志 UUID
    language: string;               // App使用的编程语言
    showName: string;               // 展示的名称 默认就是应用名称，但用户可以更改
    path: string;                   // 应用的项目路径
}

export interface ApplicationDetail {
    appUuid: string;
    appversionId: string;
    language: string;
    name: string;
    showName: string;
    importance: string;
    path: string;
    createTime: number;
    modifyTime: number;
}

/* export interface ApplicationOverview {
    securityWeakness: number;
    seriousWeakness: number;
    thirdLibParty: number;
    libCves: number;
    container: number;
    containerCves: number;
    securityBaseline: string;
    server: number;
    survivalNumber: number;
} */

export interface AppList {
    appUuid: string;
    name: string;
}

/*******************===============================================******************************/
export interface ProjectCount {
    appNum: number;
    jarNum: number;
    projectNum: number;
    cveNum: number;
    licenseNum: number;
}

export interface ProjectOverview {
    grade: string;
    number: number;
    total: number;
}

export interface EchartsVo {
    name: string;
    value: number;
}


/**
 * 高危
 */
export interface HighRiskListVo {
    jarName: string;
    cveNum: number;
    grade: string;
    score: string;
}

/**
 * 未经授权软件
 */
export interface UnauthorizedListVo {
    jarName: string;
    licnseId: number;
    createTime: string;
}


/**
 * JarList
 * 组件的基本信息
 */
export interface ProjectJarListVo {
    jarName: string;
    cveNum: number;
    licenseNum: number;
    grade: string;
    hash: string;
    orgId: string;
}

/**
 * LicenseList
 * 组件的基本信息
 */
export interface PorjectLicenseListsVo {
    name: string;
    licnseId: number;
    isosiapproved: number;
    isfsflibre: string;
    orgId: string;
}

/**
 * CVEList
 * 组件的基本信息
 */
export interface PorjectCVEListVo {
    cveId: string;
    cve: number;
    riskLevel: string; // 默认为null
    jarNum: number;
}
